﻿Type.registerNamespace("BM");

BM.CustomAction = function(determinant, actionInfo) {
    BM.CustomAction.initializeBase(this, [determinant, actionInfo]);
}

BM.CustomAction.prototype = {
    getCustomFunction: function() {
        return this.actionInfo.CustomFunction;
    },

    run: function() {
        var func = eval(this.getCustomFunction());
        if (jQuery.isFunction(func)) {
            func(this, null);
        } else {
            alert('Unknown method: ' + this.getCustomFunction());
        }
    }
}

BM.CustomAction.registerClass("BM.CustomAction", BM.Action);